import http from "@/utils/request";

export const getUserRetInfo = (params) => {
  //返回申请退货的列表
  return http.get("/userRetInfo/page", {
    params: {
      type: params.type,
      curPage: params.curPage,
      limit: params.limit,
      name: params.sname,
    },
  });
};

// export const getTypeList = (params) => {
//   //返回供应商列表
//   return http.get("/drugProblem/typeList");
// };handleRefuseRet

export const agreeUserRet = (param) => {
  //同意退货
  const myparams = new URLSearchParams();
  myparams.append("oid", param);
  return http.post("/userRetInfo/agreeUserRet", myparams);
};

export const refuseUserRet = (param) => {
  //拒绝退货
  const myparams = new URLSearchParams();
  myparams.append("oid", param);
  return http.post("/userRetInfo/refuseUserRet", myparams);
};

// export const retToFactory = (param) => {
//   //回仓
//   const myparams = new URLSearchParams();
//   myparams.append("dpid", param);
//   return http.post("/drugProblem/retToFactory", myparams);
// };
